﻿<%@ WebHandler Language="C#" Class="addContractNo" %>

using System;
using System.Web;

public class addContractNo : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string result = "false";
        //if (!CommonMethod.IsTimeOutUserCodeAndCoCode())
        //{
        //    try
        //    {
        //        contractCommon contractCom = new contractCommon();
        //        if (context.Request.Form["action"] == "addContract")
        //        {
        //            string contractNoMain = context.Request.Form["contractNo"].ToString();
        //            contractModel contract = new contractModel();
        //            contract.UserCode = HttpContext.Current.Session["UserCode"].ToString();
        //            contract.CoCode = HttpContext.Current.Session["CoCode"].ToString();
        //            contract.ContractNoMain = contractNoMain;
        //            if (contractCom.contractInsert(contract) > 0)
        //            {
        //                result = contracRow.contractRowBuild(contract);
        //            }
        //        }
        //    }
        //    catch
        //    { }
        //}
        //else
        //{
        //    result = "TimeOut";
        //}
        context.Response.Write(result);  
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}